package
{
	import com.monster.skeleton.AppLoader;
	
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.IOErrorEvent;
	import flash.events.ProgressEvent;

	[SWF(width="640", height="480", frameRate="24", backgroundColor="#0")]
	public class masterandcommander_android_loader extends Sprite
	{
		private var _appLoader:AppLoader;

		public function masterandcommander_android_loader()
		{
			super();
			
			addEventListener(Event.ADDED_TO_STAGE, onAddToStage);
			
			function onAddToStage(e:Event):void
			{
				removeEventListener(Event.ADDED_TO_STAGE, onAddToStage);
				loadMain();
			}
		}
		
		private function loadMain():void
		{
			CONFIG::debug
				{
					TRACE("init game loader");
				};
			
			_appLoader = new AppLoader(stage,
				"." + "/" + "m" + "a" + "s" + "t" + "e" + "r" + "a" + "n" + "d" + "c" + "o" + "m" + "m" + "a" + "n" + "d" + "e" + "r" + "_" + "a" + "n" + "d" + "r" + "o" + "i" + "d",
				onComplete, onError, onProgress);
			_appLoader.start();
			
			function onComplete(e:Event):void
			{
				CONFIG::debug
					{
						TRACE("complete load game main");
					};
				
				_appLoader = null;
			}
			
			function onError(e:IOErrorEvent):void
			{
			}
			
			function onProgress(e:ProgressEvent):void
			{
			}
			
		}

	}
}